{% extends "buyer/base.html" %}

{% block title %}
    订单
{% endblock %}

{% block content %}
    <div class="main">
        <!--收货地址-->

        <div class="panel panel-default ">
            <div class="panel-heading col-lg-12">确认收货地址</div>
            <div class="panel-body">
                <div>
                    {{ adr.recv_address }} （{{ adr.recver }} 收） {{ adr.a_phone }}
                    <a style="margin-left: 500px" class="btn btn-default" href="#" role="button">编辑收货地址</a>
                </div>

            </div>
        </div>
        <!--支付方式-->
        <div class="panel panel-default ">
            <div class="panel-heading col-lg-12">支付方式</div>
            <div class="panel-body">
                <div class="radio">
                    <label>
                        <input type="radio" name="optionsRadios" value="option1">
                        <img src="/static/buyer/images/pay/yhk.png" alt="..." class="img-thumbnail">
                    </label>
                    <label>
                        <input type="radio" name="optionsRadios" value="option1">
                        <img src="/static/buyer/images/pay/wx.png" alt="..." class="img-thumbnail">
                    </label>
                    <label>
                        <input type="radio" name="optionsRadios" value="option1" checked>
                        <img src="/static/buyer/images/pay/zfb.png" alt="..." class="img-thumbnail">
                    </label>
{#                    <label>#}
{#                        <input type="radio" name="optionsRadios" value="option1">#}
{#                        <img src="/static/buyer/images/pay/yl.png" alt="..." class="img-thumbnail">#}
{#                    </label>#}
                </div>

            </div>
        </div>


        <!--商品列表-->
        <div class="panel panel-default ">
            <div class="panel-heading col-lg-12">商品列表</div>
            <div class="panel-body">
                <table class="table table-bordered table-hover">
                    <tr align="center" valign="middle">
                        <td>序号</td>
                        <td>图片</td>
                        <td>商品名称</td>
                        <td>商品单位</td>
                        <td>商品价格</td>
                        <td>数量</td>
                        <td>小计</td>
                    </tr>
                    {% for ord in adr.orderinfo_set.all %}
                    <tr align="center" valign="center">
                        <td>{{ ord.id }}</td>
                        <td>
                            <img class="img-thumbnail" src="/static/buyer/images/goods02.jpg" width="60px" alt="">
                        </td>
                        <td>{{ ord.goods_id.goods_name }}</td>
                        <td>500g</td>
                        <td>{{ ord.goods_id.goods_price }}元</td>
                        <td>1</td>
                        <td>{{ ord.goods_total }}</td>
                    </tr>
                    {% endfor %}
                </table>
            </div>
        </div>

        <!--总金额结算-->
        <div class="panel panel-default">
            <div class="panel-heading col-lg-12">总金额结算</div>
            <div class="panel-body">
                <table class="table table-bordered table-hover">
                    <tr align="center" valign="middle">
                        <td>商品件数</td>
                        <td>总金额</td>
                        <td>运费</td>
                        <td>实付款</td>
                    </tr>
                    <tr align="center" valign="center">
                        <td>{{ order.g_type_number }}</td>
                        <td>
                            {{ order.g_total }}
                        </td>
                        <td>10</td>
                        <td>{{ order.g_money }}</td>
                    </tr>

                </table>
            </div>
        </div>

        <!--提交订单按钮-->
        <div>
            <a href="/buyer/pay/?order_id={{ order.order_id }}&money={{ order.g_money }}" type="button" class="btn btn-success col-lg-3 col-lg-offset-9">提交订单</a>
        </div>
    </div>
{% endblock %}